<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# " lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Tj2's Blog">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>绿萝间 (old posts, page 187) | 绿萝间</title>
<link href="assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
<link href="assets/css/ipython.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
<meta name="theme-color" content="#5670d4">
<meta name="generator" content="Nikola (getnikola.com)">
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<link rel="canonical" href="https://muxuezi.github.io/index-187.html">
<link rel="prev" href="index-188.html" type="text/html">
<link rel="next" href="index-186.html" type="text/html">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"] ],
        displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
        processEscapes: true
    },
    displayAlign: 'center', // Change this to 'center' to center equations.
    "HTML-CSS": {
        styles: {'.MathJax_Display': {"margin": 0}}
    }
});
</script><!--[if lt IE 9]><script src="assets/js/html5.js"></script><![endif]-->
</head>
<body>
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>

<!-- Menubar -->

<nav class="navbar navbar-inverse navbar-static-top"><div class="container">
<!-- This keeps the margins nice -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="https://muxuezi.github.io/">

                <span id="blog-title">绿萝间</span>
            </a>
        </div>
<!-- /.navbar-header -->
        <div class="collapse navbar-collapse" id="bs-navbar" aria-expanded="false">
            <ul class="nav navbar-nav">
<li>
<a href="archive.html">Archive</a>
                </li>
<li>
<a href="categories/">Tags</a>
                </li>
<li>
<a href="rss.xml">RSS feed</a>

                
            </li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
</div>
<!-- /.navbar-collapse -->
    </div>
<!-- /.container -->
</nav><!-- End of Menubar --><div class="container" id="content" role="main">
    <div class="body-content">
        <!--Body content-->
        <div class="row">
            
            

    
<div class="postindex">
    <article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/dlott-15097-2015-08-22-report.html" class="u-url">大乐透15097期(2015-08-22)数据分析报告</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/dlott-15097-2015-08-22-report.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-23T08:00:00+08:00" title="2015-08-23 08:00">2015-08-23 08:00</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div>
<p>如有雷同，纯属巧合</p>
<p class="more"><a href="posts/dlott-15097-2015-08-22-report.html">Read more…</a></p>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/slott-2015097-2015-08-20-report.html" class="u-url">双色球2015097期(2015-08-20)数据分析报告</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/slott-2015097-2015-08-20-report.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-21T08:00:00+08:00" title="2015-08-21 08:00">2015-08-21 08:00</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div>
<p>如有雷同，纯属巧合</p>
<p class="more"><a href="posts/slott-2015097-2015-08-20-report.html">Read more…</a></p>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/dlott-15096-2015-08-19-report.html" class="u-url">大乐透15096期(2015-08-19)数据分析报告</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/dlott-15096-2015-08-19-report.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-20T08:00:00+08:00" title="2015-08-20 08:00">2015-08-20 08:00</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div>
<p>如有雷同，纯属巧合</p>
<p class="more"><a href="posts/dlott-15096-2015-08-19-report.html">Read more…</a></p>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/slott-2015096-2015-08-18-report.html" class="u-url">双色球2015096期(2015-08-18)数据分析报告</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/slott-2015096-2015-08-18-report.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-19T08:00:00+08:00" title="2015-08-19 08:00">2015-08-19 08:00</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div>
<p>如有雷同，纯属巧合</p>
<p class="more"><a href="posts/slott-2015096-2015-08-18-report.html">Read more…</a></p>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/2-working-with-linear-models.html" class="u-url">2-working-with-linear-models</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/2-working-with-linear-models.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-18T13:07:14+08:00" title="2015-08-18 13:07">2015-08-18 13:07</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="处理线性模型">处理线性模型<a class="anchor-link" href="posts/2-working-with-linear-models.html#%E5%A4%84%E7%90%86%E7%BA%BF%E6%80%A7%E6%A8%A1%E5%9E%8B">¶</a>
</h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>本章包括以下主题：</p>
<ol>
<li><a href="posts/fitting-a-line-through-data.html">线性回归模型</a></li>
<li><a href="posts/evaluating-the-linear-regression-model.html">评估线性回归模型</a></li>
<li><a href="posts/using-ridge-regression-to-overcome-linear-regression-shortfalls.html">用岭回归弥补线性回归的不足</a></li>
<li><a href="posts/optimizing-the-ridge-regression-parameter.html">优化岭回归参数</a></li>
<li><a href="posts/using-sparsity-to-regularize-models.html">LASSO正则化</a></li>
<li><a href="posts/taking-a-more-fundamental-approach-to-regularization-with-lars.html">LARS正则化</a></li>
<li><a href="posts/using-linear-methods-for-classification-logistic-regression.html">用线性方法处理分类问题——逻辑回归</a></li>
<li><a href="posts/directly-applying-bayesian-ridge-regression.html">贝叶斯岭回归</a></li>
<li><a href="posts/using-boosting-to-learn-from-errors.html">用梯度提升回归从误差中学习</a></li>
</ol>
<p class="more"><a href="posts/2-working-with-linear-models.html">Read more…</a></p>
</div>
</div>
</div>
</div>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/directly-applying-bayesian-ridge-regression.html" class="u-url">directly-applying-bayesian-ridge-regression</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/directly-applying-bayesian-ridge-regression.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-18T12:57:47+08:00" title="2015-08-18 12:57">2015-08-18 12:57</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="贝叶斯岭回归">贝叶斯岭回归<a class="anchor-link" href="posts/directly-applying-bayesian-ridge-regression.html#%E8%B4%9D%E5%8F%B6%E6%96%AF%E5%B2%AD%E5%9B%9E%E5%BD%92">¶</a>
</h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>在<em>用岭回归弥补线性回归的不足</em>主题中，我们介绍了岭回归优化的限制条件。我们还介绍了相关系数的先验概率分布的贝叶斯解释，将很大程度地影响着先验概率分布，先验概率分布通常均值是0。</p>
<p>因此，现在我们就来演示如何scikit-learn来应用这种解释。</p>
<p class="more"><a href="posts/directly-applying-bayesian-ridge-regression.html">Read more…</a></p>
</div>
</div>
</div>
</div>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/evaluating-the-linear-regression-model.html" class="u-url">evaluating-the-linear-regression-model</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/evaluating-the-linear-regression-model.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-18T12:57:47+08:00" title="2015-08-18 12:57">2015-08-18 12:57</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="评估线性回归模型">评估线性回归模型<a class="anchor-link" href="posts/evaluating-the-linear-regression-model.html#%E8%AF%84%E4%BC%B0%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92%E6%A8%A1%E5%9E%8B">¶</a>
</h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>在这个主题中，我们将介绍回归模型拟合数据的效果。上一个主题我们拟合了数据，但是并没太关注拟合的效果。每当拟合工作做完之后，我们应该问的第一个问题就是“拟合的效果如何？”本主题将回答这个问题。</p>
<p class="more"><a href="posts/evaluating-the-linear-regression-model.html">Read more…</a></p>
</div>
</div>
</div>
</div>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/fitting-a-line-through-data.html" class="u-url">fitting-a-line-through-data</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/fitting-a-line-through-data.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-18T12:57:47+08:00" title="2015-08-18 12:57">2015-08-18 12:57</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="线性回归模型">线性回归模型<a class="anchor-link" href="posts/fitting-a-line-through-data.html#%E7%BA%BF%E6%80%A7%E5%9B%9E%E5%BD%92%E6%A8%A1%E5%9E%8B">¶</a>
</h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>现在，我们来做一些建模！我们从最简单的线性回归（Linear regression）开始。线性回归是最早的也是最基本的模型——把数据拟合成一条直线。</p>
<p class="more"><a href="posts/fitting-a-line-through-data.html">Read more…</a></p>
</div>
</div>
</div>
</div>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/optimizing-the-ridge-regression-parameter.html" class="u-url">optimizing-the-ridge-regression-parameter</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/optimizing-the-ridge-regression-parameter.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-18T12:57:47+08:00" title="2015-08-18 12:57">2015-08-18 12:57</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="优化岭回归参数">优化岭回归参数<a class="anchor-link" href="posts/optimizing-the-ridge-regression-parameter.html#%E4%BC%98%E5%8C%96%E5%B2%AD%E5%9B%9E%E5%BD%92%E5%8F%82%E6%95%B0">¶</a>
</h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>当你使用岭回归模型进行建模时，需要考虑<code>Ridge</code>的<code>alpha</code>参数。</p>
<p>例如，用OLS（普通最小二乘法）做回归也许可以显示两个变量之间的某些关系；但是，当<code>alpha</code>参数正则化之后，那些关系就会消失。做决策时，这些关系是否需要考虑就显得很重要了。</p>
<p class="more"><a href="posts/optimizing-the-ridge-regression-parameter.html">Read more…</a></p>
</div>
</div>
</div>
</div>
</div>
    </div>
    </article><article class="h-entry post-text"><header><h1 class="p-name entry-title"><a href="posts/taking-a-more-fundamental-approach-to-regularization-with-lars.html" class="u-url">taking-a-more-fundamental-approach-to-regularization-with-lars</a></h1>
        <div class="metadata">
            <p class="byline author vcard"><span class="byline-name fn">
                Tao Junjie
            </span></p>
            <p class="dateline"><a href="posts/taking-a-more-fundamental-approach-to-regularization-with-lars.html" rel="bookmark"><time class="published dt-published" datetime="2015-08-18T12:57:47+08:00" title="2015-08-18 12:57">2015-08-18 12:57</time></a></p>
        </div>
    </header><div class="p-summary entry-summary">
    <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="LARS正则化">LARS正则化<a class="anchor-link" href="posts/taking-a-more-fundamental-approach-to-regularization-with-lars.html#LARS%E6%AD%A3%E5%88%99%E5%8C%96">¶</a>
</h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>如果斯坦福大学的Bradley Efron, Trevor Hastie, Iain Johnstone和Robert Tibshirani没有发现它的话[1]，LARS(Least Angle Regression，最小角回归)可能有一天会被你想出来，它借用了<a href="https://en.wikipedia.org/wiki/Gilbert_Strang">威廉·吉尔伯特·斯特朗（William Gilbert Strang）</a>介绍过的高斯消元法（Gaussian elimination）的灵感。</p>
<p class="more"><a href="posts/taking-a-more-fundamental-approach-to-regularization-with-lars.html">Read more…</a></p>
</div>
</div>
</div>
</div>
</div>
    </div>
    </article>
</div>

        <nav class="postindexpager"><ul class="pager">
<li class="previous">
                <a href="index-188.html" rel="prev">Newer posts</a>
            </li>
            <li class="next">
                <a href="index-186.html" rel="next">Older posts</a>
            </li>
        </ul></nav><script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script><script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"] ],
        displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
        processEscapes: true
    },
    displayAlign: 'center', // Change this to 'center' to center equations.
    "HTML-CSS": {
        styles: {'.MathJax_Display': {"margin": 0}}
    }
});
</script>
</div>
        <!--End of body content-->

        <footer id="footer">
            Contents © 2017         <a href="mailto:muxuezi@gmail.com">Tao Junjie</a> - Powered by         <a href="https://getnikola.com" rel="nofollow">Nikola</a>         
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0">
<img alt="Creative Commons License BY-NC-SA" style="border-width:0; margin-bottom:12px;" src="http://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png"></a>
            
        </footer>
</div>
</div>


            <script src="assets/js/all-nocdn.js"></script><script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script><!-- fancy dates --><script>
    moment.locale("en");
    fancydates(0, "YYYY-MM-DD HH:mm");
    </script><!-- end fancy dates --><script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-51330059-1', 'auto');
  ga('send', 'pageview');

</script>
</body>
</html>
